package com.async.designpatterns.behavior.respchain;

public class ConcreteHandlerTwo implements Handler {
    private Handler nextHandler;

    public ConcreteHandlerTwo(Handler handler) {
        this.nextHandler = handler;
    }

    @Override
    public void handleRequest() {
        if (nextHandler != null) {
            nextHandler.handleRequest();
        } else {
            System.out.println("the second handler handle the request!");
        }
    }
}
